package edu.neusoft.springhtmldemo.service;

import edu.neusoft.springhtmldemo.domain.CameraManagement;
import edu.neusoft.springhtmldemo.mapper.CameraManagementMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CameraManagementService {
    @Autowired
    private CameraManagementMapper mapper;

    public List<CameraManagement> showAll() {
        return mapper.selectAll();
    }

    public void updateCameraManagement(CameraManagement cameraManagement) {
        mapper.updateCameraManagement(cameraManagement);
    }

    public void addCameraManagement(CameraManagement cameraManagement) {
        mapper.addCameraManagement(cameraManagement);
    }

    public void delCameraManagement(Integer cameraID) {
        mapper.delCameraManagement(cameraID);
    }

    public List<CameraManagement> selectCameraManagement(String cameraID, String cameraIP, String userName, String pswd, String RTSPaddress) {
        return mapper.selectCameraManagement(cameraID,cameraIP,userName,pswd,RTSPaddress);
    }

    public List<String> cameraIPValues() {
        return mapper.cameraIPValues();
    }
}
